package com.pf.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author PF
 * @date 2021/7/1 22:02
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class MailReq {

    /**
     * 接收人
     */
    private List<String> toUsers;

    /**
     * 抄送人
     */
    private List<String> ccUsers;

    /**
     * 邮件标题
     */
    private String subject;

    /**
     * 邮件内容
     */
    private String content;

    private List<Attachment> attachments;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class Attachment {
        /**
         * 附件名称（包含附件名称和后缀，如 test.pdf）
         */
        private String attachmentName;
        /**
         * 附件字节流
         */
        private byte[] attachmentBytes;
    }
}
